#include <bits/stdc++.h>

using namespace std;

int main_16()
{
    srand(5);
    int len=rand()%20,span=50;
    int sequence[len]={0},prefix_sum[len]={0};
    sequence[0]=prefix_sum[0]=rand()%span;
    for (int i=1;i<len ;++i )
    {
        sequence[i]=rand()%span;
        prefix_sum[i]=prefix_sum[i-1]+sequence[i];
    }
    --len;
    for (int j=0;j<len ;++j )
    {
        printf("%d,",sequence[j]);
    }
    printf("%d\n",sequence[len]);
    for (int i=0;i<len ;++i )
    {
        printf("%d,",prefix_sum[i]);
    }
    printf("%d\n",prefix_sum[len]);
    int l=0,r=2;
    printf("%d",prefix_sum[r]-prefix_sum[l-1]);
    return 0;
}
